import request from '@/utils/request'

// 项目=============================
// 查询项目列表
export function listProject(query) {
  return request({
    url: '/system/project/list',
    method: 'get',
    params: query
  })
}

// 查询项目详细
export function getProject(postId) {
  return request({
    url: '/system/project/' + postId,
    method: 'get'
  })
}

// 新增项目
export function addProject(data) {
  return request({
    url: '/system/project',
    method: 'post',
    data: data
  })
}

// 修改项目
export function updateProject(data) {
  return request({
    url: '/system/project',
    method: 'put',
    data: data
  })
}

// 删除项目
export function delProject(postId) {
  return request({
    url: '/system/project/' + postId,
    method: 'delete'
  })
}

// 项目岗位=============================
// 查询项目岗位列表
export function listProjectPost(query) {
  return request({
    url: '/system/project_post/list',
    method: 'get',
    params: query
  })
}

// 查询项目岗位详细
export function getProjectPost(postId) {
  return request({
    url: '/system/project_post/' + postId,
    method: 'get'
  })
}

// 新增项目岗位
export function addProjectPost(data) {
  return request({
    url: '/system/project_post',
    method: 'post',
    data: data
  })
}

// 修改项目岗位
export function updateProjectPost(data) {
  return request({
    url: '/system/project_post',
    method: 'put',
    data: data
  })
}

// 删除项目岗位
export function delProjectPost(postId) {
  return request({
    url: '/system/project_post/' + postId,
    method: 'delete'
  })
}


// 项目类型=============================
// 查询项目岗位列表
export function listProjectType(query) {
  return request({
    url: '/system/project_category/list',
    method: 'get',
    params: query
  })
}

// 查询项目岗位详细
export function getProjectType(postId) {
  return request({
    url: '/system/project_category/' + postId,
    method: 'get'
  })
}

// 新增项目岗位
export function addProjectType(data) {
  return request({
    url: '/system/project_category',
    method: 'post',
    data: data
  })
}

// 修改项目岗位
export function updateProjectType(data) {
  return request({
    url: '/system/project_category',
    method: 'put',
    data: data
  })
}

// 删除项目岗位
export function delProjectType(postId) {
  return request({
    url: '/system/project_category/' + postId,
    method: 'delete'
  })
}
